from flask import Flask
from flask import request
from stealer.stealer import Stealer

app = Flask(__name__)


@app.route('/', methods=['POST', 'GET'])
def login():
    defaults = '#功夫 #武术 #岳松  岳松评价中国武术@抖音格斗  https://v.douyin.com/J41qrxT/ 复制此链接，打开抖音搜索，直接观看视频！'
    contents = request.args.get('url', defaults)
    response = Stealer().dispatch(contents).parse(header=True)
    return response


if __name__ == "__main__":
    app.run(debug=True)
